<div class="card">
    <div class="card-header">
        <button id="addAdminBtn" type="button" class="btn btn-primary" data-toggle="modal"
                data-target="#modal-default">添加管理员</button>
    </div>
  <!-- /.card-header -->
<div class="card-body" id="adminTable">
    <% const {adminList} = data %>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th style="width: 10px">序号</th>
                <th>管理员账号</th>
                <th>注册时间</th>
                <th>最后登陆时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <%for(let i=0;i<adminList.length;i++){%>
            <tr>
                <td><%= i+1 %>.</td>
                <td><%= adminList[i].adminName %></td>
                <td><%= adminList[i].regTime %></td>
                <td><%= adminList[i].loginTime %></td>
                <td><button type="button" class="btn btn-danger btn-sm" id="btndelete"
                     data-adminname="<%= adminList[i].adminName %>" >删除</button></td>
            </tr>
            <%}%>
        </tbody>
    </table>
</div>

</div>
<div class="modal fade show" id="modal-default" style="display: none; padding-right: 17px;" aria-modal="true"
     role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">添加管理员</h4>
                <button type="button" class="close" data-dismiss="modal" id="clossAdd"  aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                <form name="adminForm">
                    <div class="form-group">
                        <label for="adminName">管理员账号</label>
                        <input name="adminName" type="text" class="form-control" id="adminName" placeholder="请输入管理员账号">
                    </div>
                    <div class="form-group">
                        <label for="password">管理员密码</label>
                        <input name="password" type="password" class="form-control" id="password" placeholder="请输入管理员密码">
                    </div>
                    <div class="form-group">
                        <label for="rePassword">重复密码</label>
                        <input name="rePassword" type="password" class="form-control" id="rePassword" placeholder="请再次输入管理密码">
                    </div>
                </form>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-default" id="closeAdminBtn" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="saveAdminBtn">保存</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
